package forecast.domain;

import java.sql.Date;
import java.util.HashSet;
import java.util.Set;

import javax.persistence.Entity;
import javax.persistence.FetchType;
import javax.persistence.GeneratedValue;
import javax.persistence.Id;
import javax.persistence.OneToMany;
import javax.persistence.OneToOne;
import javax.persistence.Table;
import javax.persistence.Transient;

import org.hibernate.annotations.GenericGenerator;

@Entity
@Table(name = "Forecasts")

public class Forecast {
	
	Activity activity;


	String userName;
	Date startDate;
	Date endDate;
	
	/**@Transient
	public int getTotalActivity() {
		int total = 0;
		for(Activity a : activities) {
			total += a.getDefaultPercentage();
		
		}
		return total;
	}*/	
	
	Long id;
	Long activityId;
	
	
	
	int eka;
	int toka;
	int kolmas;
	int neljas;
	
	public int getEka() {
		return eka;
	}

	public void setEka(int eka) {
		this.eka = eka;
	}

	public int getToka() {
		return toka;
	}

	public void setToka(int toka) {
		this.toka = toka;
	}

	public int getKolmas() {
		return kolmas;
	}

	public void setKolmas(int kolmas) {
		this.kolmas = kolmas;
	}

	public int getNeljas() {
		return neljas;
	}

	public void setNeljas(int neljas) {
		this.neljas = neljas;
	}


	
	
	public int getThisweek() {
		return thisweek;
	}

	public void setThisweek(int thisweek) {
		this.thisweek = thisweek;
	}

	public int getNextweek() {
		return nextweek;
	}

	public void setNextweek(int nextweek) {
		this.nextweek = nextweek;
	}

	int thisweek;
	int nextweek;
	
	@OneToOne
	public Activity getActivity() {
		return activity;
	}

	public void setActivity(Activity activity) {
		this.activity = activity;
	}

	public String getUserName() {
		return userName;
	}

	public void setUserName(String userName) {
		this.userName = userName;
	}

	public Date getStartDate() {
		return startDate;
	}

	public void setStartDate(Date startDate) {
		this.startDate = startDate;
	}

	public Date getEndDate() {
		return endDate;
	}

	public void setEndDate(Date endDate) {
		this.endDate = endDate;
	}

	public Long getActivityId() {
		return activityId;
	}

	public void setActivityId(Long activityId) {
		this.activityId = activityId;
	}

	@Id
	@GenericGenerator(name="generator", strategy="increment")
	@GeneratedValue(generator="generator")	
	public Long getId() {
		return id;
	}

	public void setId(Long id) {
		this.id = id;
	}
}
